# SENSOR NETWORK LOCALISATION
# OCT 15, 2012 
# AUTHOR: MANU CHANDRAN, mannsurya@gmail.com
# 
#***********************************************************************************
#	
#
#
#
#
#***********************************************************************************


#***********************************************************************************
# version 1.0
#***********************************************************************************


#************************************************************************************
# TODO
# TIME PLOT GPSX, GPSY, COMMANDS
# Implement heading in Mobile Beacon
#***********************************************************************************


import msvcrt
import datetime
import time
import numpy as np
import matplotlib.pyplot as plt
import math

#ENVIRONMENT
Xmax            = 100; #FIRST QUAD
Xmin            = 0;
Ymax            = 100;
Ymin            = 0;

MBPosx          = 0;
MBPosy          = 0;
MBRadius 		= 5;
MBVelocity 		= 2;
MBDirection 	= 45;

Nnodes 			= [['Node1',23,345],['Node2',3,45]]

print 'End of program'
print Nnodes[1]

#NODE
def fNode(NodeID,RxPacket,RSS,Gpsx,Gpsy):
	
	SettledStatus 		= 0
	NodeX 				= 1000
	NodeY 				= 1000 
	VarX 				= 100
	VarY 				= 100
	NodePacket 			= [NodeID,SettledStatus,NodeX,NodeY,VarX,VarY]
	return NodePacket

# BEACON 
def fBeacon(RxPacket,BeaconID,MBPosx,MBPosy,VisibleNodesStruct):

	MBNxtPosx 			= 1000
	MBNxtPosy 			= 1000
	BeaconPacket 		= [BeaconID,MBNxtPosx,MBNxtPosy]
	return NodePacket